<include file="Public/head"/>
<style>
    .grain-bar{
        width: 100%;
        /*border-bottom: 1px solid #ccc;*/
        overflow: hidden;
    }
    .grain-bar .item{
        line-height: 40px;
        height: 40px;
        text-align: center;
        border:1px solid #ddd;
        cursor: pointer;
        /*width: 95%;*/
        /*margin: 0 auto;*/
    }
    .grain-bar .on{
        border:1px solid #ddd;
        border-bottom: 2px solid #3498DB;
    }
    .grain-row{
        overflow: hidden;
    }
    .setting-container{
        display:none;
    }
    .grain-line-height{
        line-height: 30px;
    }




</style>
<body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">


    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>

                <!-- /section:settings.box -->
                <div class="row">
                    <div class="col-xs-12">
                        <form class="form-horizontal" id="form" method="post" action="{:U('update')}">

                            <!-- PAGE CONTENT BEGINS -->

                            <input type="hidden" name="id" value="{$res.id}" id="id"/>

                            <div class="space-4"></div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" >
                                    粮食品种 </label>
                                <div class="col-sm-9">
                                    <empty name="Think.get.id">
                                        <select id="fid" name="foodstuff_id" class="col-xs-10 col-sm-5">
                                            <volist name="foodstuff_array" id="vo">
                                                <option value="{$vo.id}">{$vo.name}</option>
                                            </volist>
                                        </select>
                                        <else/>
                                        <span class="grain-line-height col-sm-5" style="color: red">
                                            {$res.foodstuff_id|getFoodstuffNameById=###}
                                        </span>
                                    </empty>
                                    <span class="help-inline col-xs-12 col-sm-7">
                                        <span class="middle"></span>
                                    </span>
                                </div>
                            </div>


                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" >
                                    等级 </label>
                                <div class="col-sm-9">
                                    <empty name="Think.get.id">
                                        <select  name="level" class="col-xs-10 col-sm-5">
                                            <for start="1" end="6">
                                                    <option value="{$i}">{$i}</option>
                                            </for>
                                        </select>

                                        <else/>
                                        <span class="grain-line-height col-sm-5" style="color: red">
                                            {$res.level} 级
                                        </span>


                                    </empty>



                                    <span class="help-inline col-xs-12 col-sm-7">
												<span class="middle"></span>
											</span>
                                </div>
                            </div>
                            <div class="space-4"></div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1">
                                    水分 </label>
                                <div class="col-sm-9">
                                    <input type="text" name="shuifen" id="shuifen"
                                           class="col-xs-10 col-sm-4" value="{$res['shuifen']}">
                                    <span class="col-sm-1 grain-line-height">&nbsp;%</span>
                                    <span class="help-inline col-xs-12 col-sm-7">
												<span class="middle">水分不能为空,且必须为数字</span>
											</span>
                                </div>
                            </div>
                            <div class="space-4"></div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1">
                                    生霉率 </label>
                                <div class="col-sm-9">
                                    <input type="text" name="shengmei" id="shengmei"
                                           class="col-xs-10 col-sm-4" value="{$res['shengmei']}">
                                    <span class="col-sm-1 grain-line-height">&nbsp;%</span>
                                    <span class="help-inline col-xs-12 col-sm-7">
												<span class="middle">生霉率不能为空,且必须为数字</span>
                                    </span>
                                </div>
                            </div>
                            <div class="space-4"></div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1">
                                    杂质 </label>
                                <div class="col-sm-9">
                                    <input type="text" name="zazhi" id="zazhi"
                                           class="col-xs-10 col-sm-4" value="{$res['zazhi']}">
                                    <span class="col-sm-1 grain-line-height">&nbsp;%</span>
                                    <span class="help-inline col-xs-12 col-sm-7">
												<span class="middle">杂质不能为空,且必须为数字</span>
                                    </span>
                                </div>
                            </div>
                            <div class="space-4"></div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1">
                                    出糙率 </label>
                                <div class="col-sm-9">
                                    <input type="text" name="chucaolv" id="chucaolv"
                                           class="col-xs-10 col-sm-4" value="{$res['chucaolv']}">
                                    <span class="col-sm-1 grain-line-height">&nbsp;%</span>
                                    <span class="help-inline col-xs-12 col-sm-7">
												<span class="middle">出糙率不能为空,且必须为数字</span>
                                    </span>
                                </div>
                            </div>
                            <div class="space-4"></div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1">
                                    整精米率 </label>
                                <div class="col-sm-9">
                                    <input type="text" name="zhengjingmilv" id="zhengjingmilv"
                                           class="col-xs-10 col-sm-4" value="{$res['zhengjingmilv']}">
                                    <span class="col-sm-1 grain-line-height">&nbsp;%</span>
                                    <span class="help-inline col-xs-12 col-sm-7">
												<span class="middle">整精米率不能为空,且必须为数字</span>
                                    </span>
                                </div>
                            </div>
                            <div class="space-4"></div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1">
                                    谷外糙米率 </label>
                                <div class="col-sm-9">
                                    <input type="text" name="guwaicaomilv" id="guwaicaomilv"
                                           class="col-xs-10 col-sm-4" value="{$res['guwaicaomilv']}">
                                    <span class="col-sm-1 grain-line-height">&nbsp;%</span>
                                    <span class="help-inline col-xs-12 col-sm-7">
                                        <span class="middle">谷外糙米率不能为空,且必须为数字</span>
                                    </span>
                                </div>
                            </div>
                            <div class="space-4"></div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1">
                                    黄粒米 </label>
                                <div class="col-sm-9">
                                    <input type="text" name="huanglimi" id="huanglimi"
                                           class="col-xs-10 col-sm-4" value="{$res['huanglimi']}">
                                    <span class="col-sm-1 grain-line-height">&nbsp;%</span>
                                    <span class="help-inline col-xs-12 col-sm-7">
												<span class="middle">黄粒米不能为空,且必须为数字</span>
                                    </span>
                                </div>
                            </div>
                            <div class="space-4"></div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1">
                                    容重 </label>
                                <div class="col-sm-9">
                                    <input type="text" name="rongzhong" id="rongzhong"
                                           class="col-xs-10 col-sm-4" value="{$res['rongzhong']}">
                                    <span class="col-sm-1 grain-line-height">&nbsp;</span>
                                    <span class="help-inline col-xs-12 col-sm-7">
												<span class="middle">容重不能为空,且必须为数字</span>
                                    </span>
                                </div>
                            </div>
                            <div class="space-4"></div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1">
                                    价格
                                </label>
                                <div class="col-sm-9">
                                    <input type="text" name="price" id="price"
                                           class="col-xs-10 col-sm-4" value="{$res['price']}">
                                    <span class="col-sm-1 grain-line-height">&nbsp;元</span>
                                    <span class="help-inline col-xs-12 col-sm-7">
												<span class="middle">价格不能为空,且必须为数字</span>
                                    </span>
                                </div>
                            </div>
                            <div class="space-4"></div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1">
                                    设置 </label>
                                <div class="col-sm-9">
                                    <div class="grain-bar">
                                        <div class="col-sm-1 item on" id="shuifen-btn" >水分设置</div>
                                        <div class="col-sm-1 item"  id="shengmei-btn" >生霉率设置</div>
                                        <div class="col-sm-1 item" id="zazhi-btn">杂质设置</div>
                                        <div class="col-sm-1 item" id="chucaolv-btn">出糙率设置</div>
                                        <div class="col-sm-1 item" id="zhengjingmilv-btn">整精米率设置</div>
                                        <div class="col-sm-1 item" id="guwaicaomilv-btn">谷外糙米率设置</div>
                                        <div class="col-sm-1 item" id="huanglimi-btn">黄粒米设置</div>
                                    </div>
                                </div>
                            </div>
                            <div class="space-4"></div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" id="parameter-time">
                                    &nbsp;
                                </label>
                                <div class="col-sm-9">

                                        <div id="shuifen-container" class="setting-container" style="display:block">
                                            <div class="grain-row">
                                                <div class="col-sm-3">水分每超过/低于标准水平</div>
                                                <div class="col-sm-2"><input name="shuifen_number" class="col-sm-6" value="{$shuifen_array.number}" > &nbsp;%</div>
                                            </div>
                                            <div class="space-4"></div>
                                            <div  class="grain-row">
                                                <div class="col-sm-3">水分扣量</div>
                                                <div class="col-sm-2"><input name="shuifen_minus" class="col-sm-6" value="{$shuifen_array.minus}" > &nbsp;%</div>
                                            </div>
                                            <div class="space-4"></div>
                                            <div  class="grain-row">
                                                <div class="col-sm-3">晒粮扣费</div>
                                                <div class="col-sm-2"><input name="shuifen_shailiang_minus" class="col-sm-6" value="{$shuifen_array.shailiang}"> &nbsp;%</div>
                                            </div>

                                            <div class="space-4"></div>
                                            <div  class="grain-row">
                                                <div class="col-sm-3">水分增量</div>
                                                <div class="col-sm-2"><input name="shuifen_plus" class="col-sm-6" value="{$shuifen_array.plus}" > &nbsp;%</div>
                                            </div>
                                        </div>
                                        <div id="zazhi-container" class="setting-container">
                                            <div class="grain-row">
                                                <div class="col-sm-3">杂质每超过/低于标准水平</div>
                                                <div class="col-sm-2"><input name="zazhi_number" class="col-sm-6" value="{$zazhi_array.number}" > &nbsp;%</div>
                                            </div>
                                            <div class="space-4"></div>
                                            <div  class="grain-row">
                                                <div class="col-sm-3">杂质扣量</div>
                                                <div class="col-sm-2"><input name="zazhi_minus" class="col-sm-6" value="{$zazhi_array.minus}" > &nbsp;%</div>
                                            </div>
                                            <div class="space-4"></div>
                                            <div  class="grain-row">
                                                <div class="col-sm-3">扣清杂费</div>
                                                <div class="col-sm-2"><input name="zazhi_qingzafei_minus" class="col-sm-6" value="{$zazhi_array.qingzafei}"> &nbsp;%</div>
                                            </div>

                                            <div class="space-4"></div>
                                            <div  class="grain-row">
                                                <div class="col-sm-3">杂质增量</div>
                                                <div class="col-sm-2"><input name="zazhi_plus" class="col-sm-6" value="{$zazhi_array.plus}" > &nbsp;%</div>
                                            </div>
                                        </div>
                                        <div id="shengmei-container" class="setting-container">
                                            <div class="grain-row">
                                                <div class="col-sm-3">生霉率每超过/低于标准水平</div>
                                                <div class="col-sm-2"><input name="shengmei_number" class="col-sm-6" value="{$shengmei_array.number}" > &nbsp;%</div>
                                            </div>
                                            <div class="space-4"></div>
                                            <div  class="grain-row">
                                                <div class="col-sm-3">生霉率扣量</div>
                                                <div class="col-sm-2"><input name="shengmei_minus" class="col-sm-6" value="{$shengmei_array.minus}" > &nbsp;%</div>
                                            </div>

                                            <div class="space-4"></div>
                                            <div  class="grain-row">
                                                <div class="col-sm-3">生霉率增量</div>
                                                <div class="col-sm-2"><input name="shengmei_plus" class="col-sm-6" value="{$shengmei_array.plus}" > &nbsp;%</div>
                                            </div>
                                        </div>
                                        <div id="chucaolv-container"  class="setting-container">
                                            <div class="grain-row">
                                                <div class="col-sm-3">出糙率每超过/低于标准水平</div>
                                                <div class="col-sm-2"><input name="chucaolv_number" class="col-sm-6" value="{$chucaolv_array.number}" > &nbsp;%</div>
                                            </div>
                                            <div class="space-4"></div>
                                            <div  class="grain-row">
                                                <div class="col-sm-3">出糙率扣量</div>
                                                <div class="col-sm-2"><input name="chucaolv_minus" class="col-sm-6" value="{$chucaolv_array.minus}" > &nbsp;%</div>
                                            </div>

                                            <div class="space-4"></div>
                                            <div  class="grain-row">
                                                <div class="col-sm-3">出糙率增量</div>
                                                <div class="col-sm-2"><input name="chucaolv_plus" class="col-sm-6" value="{$chucaolv_array.plus}"  > &nbsp;%</div>
                                            </div>
                                        </div>
                                        <div id="zhengjingmilv-container"  class="setting-container">
                                            <div class="grain-row">
                                                <div class="col-sm-3">整精米率每超过/低于标准水平</div>
                                                <div class="col-sm-2"><input name="zhengjingmilv_number" class="col-sm-6" value="{$zhengjingmilv_array.number}"  > &nbsp;%</div>
                                            </div>
                                            <div class="space-4"></div>
                                            <div  class="grain-row">
                                                <div class="col-sm-3">整精米率扣量</div>
                                                <div class="col-sm-2"><input name="zhengjingmilv_minus" class="col-sm-6" value="{$zhengjingmilv_array.minus}" > &nbsp;%</div>
                                            </div>

                                            <div class="space-4"></div>
                                            <div  class="grain-row">
                                                <div class="col-sm-3">整精米率增量</div>
                                                <div class="col-sm-2"><input name="zhengjingmilv_plus" class="col-sm-6" value="{$zhengjingmilv_array.plus}"  > &nbsp;%</div>
                                            </div>
                                        </div
                                                >
                                        <div id="guwaicaomilv-container"  class="setting-container">
                                            <div class="grain-row">
                                                <div class="col-sm-3">谷外糙米率每超过/低于标准水平</div>
                                                <div class="col-sm-2"><input name="guwaicaomilv_number" class="col-sm-6" value="{$guwaicaomilv_array.number}"  > &nbsp;%</div>
                                            </div>
                                            <div class="space-4"></div>
                                            <div  class="grain-row">
                                                <div class="col-sm-3">谷外糙米率扣量</div>
                                                <div class="col-sm-2"><input name="guwaicaomilv_minus" class="col-sm-6" value="{$guwaicaomilv_array.minus}"  > &nbsp;%</div>
                                            </div>

                                            <div class="space-4"></div>
                                            <div  class="grain-row">
                                                <div class="col-sm-3">谷外糙米率增量</div>
                                                <div class="col-sm-2"><input name="guwaicaomilv_plus" class="col-sm-6" value="{$guwaicaomilv_array.plus}"  > &nbsp;%</div>
                                            </div>
                                        </div>
                                        <div id="huanglimi-container"  class="setting-container">
                                            <div class="grain-row">
                                                <div class="col-sm-3">黄粒米率每超过/低于标准水平</div>
                                                <div class="col-sm-2"><input name="huanglimi_number" class="col-sm-6" value="{$huanglimi_array.number}"  > &nbsp;%</div>
                                            </div>
                                            <div class="space-4"></div>
                                            <div  class="grain-row">
                                                <div class="col-sm-3">黄粒米率扣量</div>
                                                <div class="col-sm-2"><input name="huanglimi_minus" class="col-sm-6" value="{$huanglimi_array.minus}"  > &nbsp;%</div>
                                            </div>

                                            <div class="space-4"></div>
                                            <div  class="grain-row">
                                                <div class="col-sm-3">黄粒米率增量</div>
                                                <div class="col-sm-2"><input name="huanglimi_plus" class="col-sm-6" value="{$huanglimi_array.plus}"  > &nbsp;%</div>
                                            </div>
                                        </div>

                                </div>
                            </div>




                            <div class="col-md-offset-2 col-md-9">
                                <button class="btn btn-info submit" type="button">
                                    <i class="icon-ok bigger-110"></i>
                                    提交
                                </button>

                                &nbsp; &nbsp; &nbsp;
                                <button class="btn" type="reset">
                                    <i class="icon-undo bigger-110"></i>
                                    重置
                                </button>
                            </div>

                            <!-- PAGE CONTENT ENDS -->


                        </form>
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <include file="Public/footer"/>

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script type="text/javascript">
    $(function () {
        $("input").attr("placeholder","0.00");



        $(".grain-bar").children(".item").click(function(){
            $(".item").removeClass("on");
            $(this).addClass("on");
            var id = $(this).attr("id");
            var arr = id.split("-");
            var str = arr[0];

            $(".setting-container").css("display","none");
            $("#"+str+"-container").css("display","block");
        });





        $(".submit").click(function () {
//            var shuifen = $("#shuifen").val();
//            if (shuifen == '') {
//                bootbox.dialog({
//                    title: '友情提示：',
//                    message: "仓库名称必须填写。",
//                    buttons: {
//                        "success": {
//                            "label": "确定",
//                            "className": "btn-danger"
//                        }
//                    }
//                });
//                return;
//            }
            $("#form").submit();
        });
    });
</script>
</body>
</html>
